﻿<UserControl x:Class="Peter.Sdw.View.ChapterEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="clr-namespace:Peter.Common.Controls;assembly=Peter.Common"
             xmlns:logic="clr-namespace:Peter.Sdw.Logic"
             xmlns:icons="clr-namespace:Peter.Common.Icons;assembly=Peter.Common"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400" d:DataContext="{d:DesignInstance logic:ChapterModel}">
   <Grid Margin="5,0,0,0">
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <TextBlock Text="Chapter Details"
                 FontWeight="Bold"
                 Grid.Row="0" />
      <TextBlock Grid.Row="1"
                 Text="Name" />
      <TextBox Grid.Row="2"
               Text="{Binding Path=Name}" />
      <TextBlock Grid.Row="3"
                 Text="Order" />
      <controls:NumericUpDown Grid.Row="4"
                              Precision="0"
                              Value="{Binding Path=Order}" />
      <TextBlock Grid.Row="5"
                 Text="Number" />
      <controls:NumericUpDown Grid.Row="6"
                              Precision="0"
                              Value="{Binding Path=Number}" />
      <CheckBox Content="Hide"
                Grid.Row="7"
                Margin="0,5,0,0"
                VerticalAlignment="Center"
                IsChecked="{Binding Path=Hide}" />
      <TextBlock Grid.Row="8"
                 Text="Reading Mode" />
      <ComboBox Grid.Row="9"
                Margin="0,5,0,0"
                SelectedItem="{Binding Path=Mode, Mode=TwoWay}"
                ItemsSource="{Binding Path=ReadingModes}" />
      <!--<Button Grid.Row="9"
              Margin="0,5,0,0"
              ToolTip="Edit Chapter Header and Footer"
              Command="{Binding Path=EditChapterCommand}">
         <StackPanel Orientation="Horizontal">
            <icons:IconDisplay Icon="Edit" />
            <TextBlock Text="Edit"
                       Margin="5,0,0,0" />
         </StackPanel>
      </Button>-->
      <Button Grid.Row="10"
              Margin="0,5,0,0"
              Style="{DynamicResource ButtonSuccess}"
              Command="{Binding Path=AddPassagesCommand}">
         <StackPanel Orientation="Horizontal">
            <icons:IconDisplay Icon="Createfile"
                               IconSize="Small" />
            <TextBlock Text="Add Passages"
                       Margin="4,0"
                       VerticalAlignment="Center" />
         </StackPanel>
      </Button>
      <Button ToolTip="Delete this Chapter"
              Style="{DynamicResource ButtonError}"
              Command="{Binding Path=DeleteCommand}"
              Margin="0,5,0,0"
              Grid.Row="11">
         <StackPanel Orientation="Horizontal">
            <icons:IconDisplay Icon="Trash" />
            <TextBlock Text="Delete"
                       Margin="5,0,0,0" />
         </StackPanel>
      </Button>
   </Grid>
</UserControl>
